#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n;
    double x,i=1,y,t=0;
    double s=0;
    scanf("%d",&n);
    x=1;
    y=2;
    while(i<=n)
    {
      s=s+y/x;
      t=x+y;
      x=y;
      y=t;
      i++;
    }
    printf("%.4f\n",s);
    return 0;
}
